//:C04:DateIOTest.cpp
// {L} ../C02/Date
#include <iostream>
#include <sstream>
#include "../C02/Date1.h"
using namespace std;

void testDate(const string& s) {
  istringstream os(s);
  Date d;
  os >> d;
  if(os) {
    cout << d << endl;
  }  
  else {
    cout << "input error with \"" << s << "\"" << endl;
  }
}

int main(void) {
  testDate("08-10-2003");
  testDate("8-10-2003");
  testDate("08 - 10 - 2003");
  testDate("A-10-2003");
  testDate("08%10/2003");
}